<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
  String path = request.getContextPath();
  String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
  String _id=request.getParameter("_");
%>
<form id="dutyDlg_form" action="" method="post"  class="form-horizontal">

    <input type="hidden" name="keyId" id="keyId" value="${keyId}"/>
    <input type="hidden" name="entityName" id="entityName" value="${entityName}" />

    <div class="form-group" >
        <div class="col-md-1">
        </div>
        <div class="col-md-7">
            <c:forEach items="${dutyList}" varStatus="i" var="list" >
                <div class="radio">
                    <input type="radio" name="dutyId" id="dutyId${i.index}" value="${list.id}" class="magic-radio"  >
                    <label for="dutyId${i.index}">${list.power.department.name}-${list.power.post.name}</label>
                </div>
            </c:forEach>
        </div>
    </div>

</form>

<script>


   function fn_dialog_multiDuty_select(callback){
        var selectedDutyId =  $(':checked[name="dutyId"]').val();
        var selectedDutyName =  $(':checked[name="dutyId"]').next("label").text();
        if(!selectedDutyId){
            __toastr_warning('请选择一个职权');
            callback();
            return;
        }
       callback({"name":selectedDutyName,"id":selectedDutyId});
   }
</script>